3.79 \(\int f^{a+b x} \sin (d+f x^2) \, dx\)

Optimal. Leaf size=142 \[ \frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{1}{4} i \left (\frac{b^2 \log ^2(f)}{f}+4 d\right )} \text{Erf}\left (\frac{\sqrt [4]{-1} (b \log (f)+2 i f x)}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{-\frac{1}{4} i \left (\frac{b^2 \log ^2(f)}{f}+4 d\right )} \text{Erfi}\left (\frac{\sqrt [4]{-1} (-b \log (f)+2 i f x)}{2 \sqrt{f}}\right ) \]

[Out]

((-1)^(3/4)*E^((I/4)*(4*d + (b^2*Log[f]^2)/f))*f^(-1/2 + a)*Sqrt[Pi]*Erf[((-1)^(1/4)*((2*I)*f*x + b*Log[f]))/(
2*Sqrt[f])])/4 - ((-1)^(3/4)*f^(-1/2 + a)*Sqrt[Pi]*Erfi[((-1)^(1/4)*((2*I)*f*x - b*Log[f]))/(2*Sqrt[f])])/(4*E
^((I/4)*(4*d + (b^2*Log[f]^2)/f)))

________________________________________________________________________________________

Rubi [A]  time = 0.210487, antiderivative size = 142, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {4472, 2287, 2234, 2204, 2205} \[ \frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{\frac{1}{4} i \left (\frac{b^2 \log ^2(f)}{f}+4 d\right )} \text{Erf}\left (\frac{\sqrt [4]{-1} (b \log (f)+2 i f x)}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} \sqrt{\pi } f^{a-\frac{1}{2}} e^{-\frac{1}{4} i \left (\frac{b^2 \log ^2(f)}{f}+4 d\right )} \text{Erfi}\left (\frac{\sqrt [4]{-1} (-b \log (f)+2 i f x)}{2 \sqrt{f}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[f^(a + b*x)*Sin[d + f*x^2],x]

[Out]

((-1)^(3/4)*E^((I/4)*(4*d + (b^2*Log[f]^2)/f))*f^(-1/2 + a)*Sqrt[Pi]*Erf[((-1)^(1/4)*((2*I)*f*x + b*Log[f]))/(
2*Sqrt[f])])/4 - ((-1)^(3/4)*f^(-1/2 + a)*Sqrt[Pi]*Erfi[((-1)^(1/4)*((2*I)*f*x - b*Log[f]))/(2*Sqrt[f])])/(4*E
^((I/4)*(4*d + (b^2*Log[f]^2)/f)))

Rule 4472

Int[(F_)^(u_)*Sin[v_]^(n_.), x_Symbol] :> Int[ExpandTrigToExp[F^u, Sin[v]^n, x], x] /; FreeQ[F, x] && (LinearQ
[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

Rule 2287

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

Rule 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int f^{a+b x} \sin \left (d+f x^2\right ) \, dx &=\int \left (\frac{1}{2} i e^{-i d-i f x^2} f^{a+b x}-\frac{1}{2} i e^{i d+i f x^2} f^{a+b x}\right ) \, dx\\ &=\frac{1}{2} i \int e^{-i d-i f x^2} f^{a+b x} \, dx-\frac{1}{2} i \int e^{i d+i f x^2} f^{a+b x} \, dx\\ &=\frac{1}{2} i \int e^{-i d-i f x^2+a \log (f)+b x \log (f)} \, dx-\frac{1}{2} i \int e^{i d+i f x^2+a \log (f)+b x \log (f)} \, dx\\ &=\frac{1}{2} \left (i e^{-\frac{1}{4} i \left (4 d+\frac{b^2 \log ^2(f)}{f}\right )} f^a\right ) \int e^{\frac{i (-2 i f x+b \log (f))^2}{4 f}} \, dx-\frac{1}{2} \left (i e^{\frac{1}{4} i \left (4 d+\frac{b^2 \log ^2(f)}{f}\right )} f^a\right ) \int e^{-\frac{i (2 i f x+b \log (f))^2}{4 f}} \, dx\\ &=\frac{1}{4} (-1)^{3/4} e^{\frac{1}{4} i \left (4 d+\frac{b^2 \log ^2(f)}{f}\right )} f^{-\frac{1}{2}+a} \sqrt{\pi } \text{erf}\left (\frac{\sqrt [4]{-1} (2 i f x+b \log (f))}{2 \sqrt{f}}\right )-\frac{1}{4} (-1)^{3/4} e^{-\frac{1}{4} i \left (4 d+\frac{b^2 \log ^2(f)}{f}\right )} f^{-\frac{1}{2}+a} \sqrt{\pi } \text{erfi}\left (\frac{\sqrt [4]{-1} (2 i f x-b \log (f))}{2 \sqrt{f}}\right )\\ \end{align*}

Mathematica [A]  time = 0.2288, size = 132, normalized size = 0.93 \[ -\frac{1}{4} \sqrt [4]{-1} \sqrt{\pi } f^{a-\frac{1}{2}} e^{-\frac{i b^2 \log ^2(f)}{4 f}} \left (e^{\frac{i b^2 \log ^2(f)}{2 f}} (\cos (d)+i \sin (d)) \text{Erfi}\left (\frac{\sqrt [4]{-1} (2 f x-i b \log (f))}{2 \sqrt{f}}\right )+(\sin (d)+i \cos (d)) \text{Erfi}\left (\frac{(-1)^{3/4} (2 f x+i b \log (f))}{2 \sqrt{f}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[f^(a + b*x)*Sin[d + f*x^2],x]

[Out]

-((-1)^(1/4)*f^(-1/2 + a)*Sqrt[Pi]*(E^(((I/2)*b^2*Log[f]^2)/f)*Erfi[((-1)^(1/4)*(2*f*x - I*b*Log[f]))/(2*Sqrt[
f])]*(Cos[d] + I*Sin[d]) + Erfi[((-1)^(3/4)*(2*f*x + I*b*Log[f]))/(2*Sqrt[f])]*(I*Cos[d] + Sin[d])))/(4*E^(((I
/4)*b^2*Log[f]^2)/f))

________________________________________________________________________________________

Maple [A]  time = 0.267, size = 116, normalized size = 0.8 \begin{align*}{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{{\frac{{\frac{i}{4}} \left ( \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}+4\,df \right ) }{f}}}}{\it Erf} \left ( -\sqrt{-if}x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{-if}}}} \right ){\frac{1}{\sqrt{-if}}}}-{{\frac{i}{4}}{f}^{a}\sqrt{\pi }{{\rm e}^{{\frac{-{\frac{i}{4}} \left ( \left ( \ln \left ( f \right ) \right ) ^{2}{b}^{2}+4\,df \right ) }{f}}}}{\it Erf} \left ( -\sqrt{if}x+{\frac{b\ln \left ( f \right ) }{2}{\frac{1}{\sqrt{if}}}} \right ){\frac{1}{\sqrt{if}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(f^(b*x+a)*sin(f*x^2+d),x)

[Out]

1/4*I*Pi^(1/2)*f^a*exp(1/4*I*(ln(f)^2*b^2+4*d*f)/f)/(-I*f)^(1/2)*erf(-(-I*f)^(1/2)*x+1/2*ln(f)*b/(-I*f)^(1/2))
-1/4*I*Pi^(1/2)*f^a*exp(-1/4*I*(ln(f)^2*b^2+4*d*f)/f)/(I*f)^(1/2)*erf(-(I*f)^(1/2)*x+1/2*ln(f)*b/(I*f)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(b*x+a)*sin(f*x^2+d),x, algorithm="maxima")

[Out]

Exception raised: IndexError

________________________________________________________________________________________

Fricas [B]  time = 0.504809, size = 749, normalized size = 5.27 \begin{align*} \frac{i \, \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{-i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) - 4 i \, d f}{4 \, f}\right )} \operatorname{C}\left (\frac{\sqrt{2}{\left (2 \, f x + i \, b \log \left (f\right )\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) + i \, \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) + 4 i \, d f}{4 \, f}\right )} \operatorname{C}\left (-\frac{\sqrt{2}{\left (2 \, f x - i \, b \log \left (f\right )\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) + \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{-i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) - 4 i \, d f}{4 \, f}\right )} \operatorname{S}\left (\frac{\sqrt{2}{\left (2 \, f x + i \, b \log \left (f\right )\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right ) - \sqrt{2} \pi \sqrt{\frac{f}{\pi }} e^{\left (\frac{i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) + 4 i \, d f}{4 \, f}\right )} \operatorname{S}\left (-\frac{\sqrt{2}{\left (2 \, f x - i \, b \log \left (f\right )\right )} \sqrt{\frac{f}{\pi }}}{2 \, f}\right )}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(b*x+a)*sin(f*x^2+d),x, algorithm="fricas")

[Out]

1/4*(I*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + 4*a*f*log(f) - 4*I*d*f)/f)*fresnel_cos(1/2*sqrt(2)*(2*f
*x + I*b*log(f))*sqrt(f/pi)/f) + I*sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(I*b^2*log(f)^2 + 4*a*f*log(f) + 4*I*d*f)/f)*f
resnel_cos(-1/2*sqrt(2)*(2*f*x - I*b*log(f))*sqrt(f/pi)/f) + sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + 4
*a*f*log(f) - 4*I*d*f)/f)*fresnel_sin(1/2*sqrt(2)*(2*f*x + I*b*log(f))*sqrt(f/pi)/f) - sqrt(2)*pi*sqrt(f/pi)*e
^(1/4*(I*b^2*log(f)^2 + 4*a*f*log(f) + 4*I*d*f)/f)*fresnel_sin(-1/2*sqrt(2)*(2*f*x - I*b*log(f))*sqrt(f/pi)/f)
)/f

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int f^{a + b x} \sin{\left (d + f x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f**(b*x+a)*sin(f*x**2+d),x)

[Out]

Integral(f**(a + b*x)*sin(d + f*x**2), x)

________________________________________________________________________________________

Giac [B]  time = 1.28821, size = 405, normalized size = 2.85 \begin{align*} \frac{i \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\frac{1}{8} \, \sqrt{2}{\left (4 \, x - \frac{\pi b \mathrm{sgn}\left (f\right ) - \pi b + 2 i \, b \log \left ({\left | f \right |}\right )}{f}\right )}{\left (-\frac{i \, f}{{\left | f \right |}} + 1\right )} \sqrt{{\left | f \right |}}\right ) e^{\left (\frac{i \, \pi ^{2} b^{2} \mathrm{sgn}\left (f\right )}{8 \, f} + \frac{\pi b^{2} \log \left ({\left | f \right |}\right ) \mathrm{sgn}\left (f\right )}{4 \, f} - \frac{i \, \pi ^{2} b^{2}}{8 \, f} - \frac{\pi b^{2} \log \left ({\left | f \right |}\right )}{4 \, f} + \frac{i \, b^{2} \log \left ({\left | f \right |}\right )^{2}}{4 \, f} - \frac{1}{2} i \, \pi a \mathrm{sgn}\left (f\right ) + \frac{1}{2} i \, \pi a + a \log \left ({\left | f \right |}\right ) + i \, d\right )}}{4 \,{\left (-\frac{i \, f}{{\left | f \right |}} + 1\right )} \sqrt{{\left | f \right |}}} - \frac{i \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\frac{1}{8} \, \sqrt{2}{\left (4 \, x + \frac{\pi b \mathrm{sgn}\left (f\right ) - \pi b + 2 i \, b \log \left ({\left | f \right |}\right )}{f}\right )}{\left (\frac{i \, f}{{\left | f \right |}} + 1\right )} \sqrt{{\left | f \right |}}\right ) e^{\left (-\frac{i \, \pi ^{2} b^{2} \mathrm{sgn}\left (f\right )}{8 \, f} - \frac{\pi b^{2} \log \left ({\left | f \right |}\right ) \mathrm{sgn}\left (f\right )}{4 \, f} + \frac{i \, \pi ^{2} b^{2}}{8 \, f} + \frac{\pi b^{2} \log \left ({\left | f \right |}\right )}{4 \, f} - \frac{i \, b^{2} \log \left ({\left | f \right |}\right )^{2}}{4 \, f} - \frac{1}{2} i \, \pi a \mathrm{sgn}\left (f\right ) + \frac{1}{2} i \, \pi a + a \log \left ({\left | f \right |}\right ) - i \, d\right )}}{4 \,{\left (\frac{i \, f}{{\left | f \right |}} + 1\right )} \sqrt{{\left | f \right |}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(f^(b*x+a)*sin(f*x^2+d),x, algorithm="giac")

[Out]

1/4*I*sqrt(2)*sqrt(pi)*erf(-1/8*sqrt(2)*(4*x - (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*(-I*f/abs(f) + 1)*s
qrt(abs(f)))*e^(1/8*I*pi^2*b^2*sgn(f)/f + 1/4*pi*b^2*log(abs(f))*sgn(f)/f - 1/8*I*pi^2*b^2/f - 1/4*pi*b^2*log(
abs(f))/f + 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) + I*d)/((-I*f/abs(f) +
1)*sqrt(abs(f))) - 1/4*I*sqrt(2)*sqrt(pi)*erf(-1/8*sqrt(2)*(4*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*
(I*f/abs(f) + 1)*sqrt(abs(f)))*e^(-1/8*I*pi^2*b^2*sgn(f)/f - 1/4*pi*b^2*log(abs(f))*sgn(f)/f + 1/8*I*pi^2*b^2/
f + 1/4*pi*b^2*log(abs(f))/f - 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) - I*
d)/((I*f/abs(f) + 1)*sqrt(abs(f)))